import 'package:json_annotation/json_annotation.dart';
import 'package:zhaoxiaowu_app/models/user.dart';

part 'login.g.dart';

@JsonSerializable()
class Login {
  final String token;
  final User? user;

  Login({
    required this.token,
    this.user,
  });

  factory Login.fromJson(Map<String, dynamic> json) => _$LoginFromJson(json);
  Map<String, dynamic> toJson() => _$LoginToJson(this);
}
